package com.zczc.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @ClassName: MessageInfo
* @Description: message_info表对应的java bean类
* @author: yishui zhiyubujian@163.com
 */
@Table(name = "message_info")
public class MessageInfo implements Serializable {
    /**
     * @Fields message_info.id :
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "select uuid()")
    private String id;

    /**
     * 消息标题
     */
    /**
     * @Fields message_info.title :消息标题
     */
    @NotNull(message = "title不能为null")
    @NotEmpty(message = "title不能为空")
    @Column(name = "title")
    private String title;

    /**
     * 消息内容
     */
    /**
     * @Fields message_info.content :消息内容
     */
    @NotNull(message = "content不能为null")
    @NotEmpty(message = "content不能为空")
    @Column(name = "content")
    private String content;

    /**
     * 消息类型
     */
    /**
     * @Fields message_info.message_type :消息类型
     */
    @Column(name = "message_type")
    @NotNull(message = "messageType不能为null")
    @NotEmpty(message = "messageType不能为空")
    private String messageType;

    /**
     * 消息链接
     */
    /**
     * @Fields message_info.message_url :消息链接
     */
    @Column(name = "message_url")
    private String messageUrl;

    /**
     * 消息作者
     */
    /**
     * @Fields message_info.message_creater :消息作者
     */
    @Column(name = "message_creater")
    private String messageCreater;

    /**
     * 创建消息的时间
     */
    /**
     * @Fields message_info.create_time :创建消息的时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 修改消息的时间
     */
    /**
     * @Fields message_info.update_time :修改消息的时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 推送消息的时间
     */
    /**
     * @Fields message_info.push_time :推送消息的时间
     */
    @Column(name = "push_time")
    private Date pushTime;

    /**
     * 逻辑删除
     */
    /**
     * @Fields message_info.deleted :逻辑删除
     */
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    /**
     * @return message_info.id : 返回 
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    /**
     * @param id of message_info : 设置 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取消息标题
     *
     * @return title - 消息标题
     */
    /**
     * @return message_info.title : 返回 消息标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置消息标题
     *
     * @param title 消息标题
     */
    /**
     * @param title of message_info : 设置 消息标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取消息内容
     *
     * @return content - 消息内容
     */
    /**
     * @return message_info.content : 返回 消息内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置消息内容
     *
     * @param content 消息内容
     */
    /**
     * @param content of message_info : 设置 消息内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取消息类型
     *
     * @return message_type - 消息类型
     */
    /**
     * @return message_info.message_type : 返回 消息类型
     */
    public String getMessageType() {
        return messageType;
    }

    /**
     * 设置消息类型
     *
     * @param messageType 消息类型
     */
    /**
     * @param messageType of message_info : 设置 消息类型
     */
    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    /**
     * 获取消息链接
     *
     * @return message_url - 消息链接
     */
    /**
     * @return message_info.message_url : 返回 消息链接
     */
    public String getMessageUrl() {
        return messageUrl;
    }

    /**
     * 设置消息链接
     *
     * @param messageUrl 消息链接
     */
    /**
     * @param messageUrl of message_info : 设置 消息链接
     */
    public void setMessageUrl(String messageUrl) {
        this.messageUrl = messageUrl;
    }

    /**
     * 获取消息作者
     *
     * @return message_creater - 消息作者
     */
    /**
     * @return message_info.message_creater : 返回 消息作者
     */
    public String getMessageCreater() {
        return messageCreater;
    }

    /**
     * 设置消息作者
     *
     * @param messageCreater 消息作者
     */
    /**
     * @param messageCreater of message_info : 设置 消息作者
     */
    public void setMessageCreater(String messageCreater) {
        this.messageCreater = messageCreater;
    }

    /**
     * 获取创建消息的时间
     *
     * @return create_time - 创建消息的时间
     */
    /**
     * @return message_info.create_time : 返回 创建消息的时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建消息的时间
     *
     * @param createTime 创建消息的时间
     */
    /**
     * @param createTime of message_info : 设置 创建消息的时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取修改消息的时间
     *
     * @return update_time - 修改消息的时间
     */
    /**
     * @return message_info.update_time : 返回 修改消息的时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置修改消息的时间
     *
     * @param updateTime 修改消息的时间
     */
    /**
     * @param updateTime of message_info : 设置 修改消息的时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取推送消息的时间
     *
     * @return push_time - 推送消息的时间
     */
    /**
     * @return message_info.push_time : 返回 推送消息的时间
     */
    public Date getPushTime() {
        return pushTime;
    }

    /**
     * 设置推送消息的时间
     *
     * @param pushTime 推送消息的时间
     */
    /**
     * @param pushTime of message_info : 设置 推送消息的时间
     */
    public void setPushTime(Date pushTime) {
        this.pushTime = pushTime;
    }

    /**
     * 获取逻辑删除
     *
     * @return deleted - 逻辑删除
     */
    /**
     * @return message_info.deleted : 返回 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置逻辑删除
     *
     * @param deleted 逻辑删除
     */
    /**
     * @param deleted of message_info : 设置 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", content=").append(content);
        sb.append(", messageType=").append(messageType);
        sb.append(", messageUrl=").append(messageUrl);
        sb.append(", messageCreater=").append(messageCreater);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", pushTime=").append(pushTime);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessageInfo other = (MessageInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
            && (this.getMessageUrl() == null ? other.getMessageUrl() == null : this.getMessageUrl().equals(other.getMessageUrl()))
            && (this.getMessageCreater() == null ? other.getMessageCreater() == null : this.getMessageCreater().equals(other.getMessageCreater()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getPushTime() == null ? other.getPushTime() == null : this.getPushTime().equals(other.getPushTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
        result = prime * result + ((getMessageUrl() == null) ? 0 : getMessageUrl().hashCode());
        result = prime * result + ((getMessageCreater() == null) ? 0 : getMessageCreater().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getPushTime() == null) ? 0 : getPushTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}